package com.hightrast.service.compareToData.stage.impl;

import com.hightrast.service.api.entity.RastProductImages;
import com.hightrast.service.compareToData.stage.EntityUpdater;
import com.hightrast.service.util.BaseEntityUtil;

/**
 *  商品图片 更新策略实现
 */
public class RastProductImagesUpdater implements EntityUpdater<RastProductImages> {
    @Override
    public void updateEntity(RastProductImages oldEntity, RastProductImages newEntity) {
        oldEntity.setProductId(newEntity.getProductId());
        oldEntity.setPosition(newEntity.getPosition());
        oldEntity.setSrc(newEntity.getSrc());
        oldEntity.setVariantIds(newEntity.getVariantIds());
        BaseEntityUtil.update(oldEntity);
    }
}